package io.github.cunyu1943;

/**
 * Created with IntelliJ IDEA.
 *
 * @Package : io.github.cunyu1943
 * @ClassName : MountQomolangma.java
 * @CreateTime : 2022/11/27 19:50
 * @Version : 1.0
 * @Author : 村雨遥
 * @Email : 747731461@qq.com
 * @公众号 : 村雨遥
 * @Website : https://cunyu1943.github.io/JavaPark
 * @Description : 求折叠的次数
 */
public class MountQomolangma {
    public static final double HEIGHT = 8844430;

    public static void main(String[] args) {
        // 初始厚度
        double init = 0.1;

        // 统计次数
        int count = 0;

        while (init < HEIGHT) {
            init *= 2;
            count++;
        }

        System.out.println("一共需要折叠 " + count + " 次");
    }
}
